package org.agent.aigccore.basic.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("AIGC Core API")
                        .version("3.0")
                        .description("AIGC Core API 文档 - 提供任务流管理、用户认证等功能")
                        .contact(new Contact()
                                .name("AIGC Core Team")
                                .email("support@aigccore.com")))
                .servers(List.of(
                        new Server().url("http://localhost:8080").description("本地开发环境"),
                        new Server().url("https://api.aigccore.com").description("生产环境")
                ));
    }
}